using System;
using Org.BouncyCastle.Security;

namespace Org.BouncyCastle.Crypto
    /// <summary>
    /// The base class for parameters to key generators.
    /// </summary>
    public class KeyGenerationParameters
    {
        private SecureRandom	random;
        private int				strength;
		private int				strength;
        ///<summary>
        /// Initialize generator with random source and strength (in bits)
        /// </summary>
        /// <param name="random">the random byte source</param>
        /// <param name="strength">size, in bits, of keys we want to produce</param>
        public KeyGenerationParameters(
            SecureRandom	random,
            int				strength)
        {
            if (random == null)
                throw new ArgumentNullException("random");
            if (strength < 1)
                throw new ArgumentException("strength must be a positive value", "strength");
				throw new ArgumentException("strength must be a positive value", "strength");
            this.random = random;
            this.strength = strength;
        }
		}
        ///<summary>return this parameter set's random generator</summary>
        public SecureRandom Random
        {
            get { return random; }
        }
		}
        ///<summary>return this parameter set's strength in bits</summary>
        public int Strength
        {
            get { return strength; }
        }
    }
	}
}
